package sis.report;/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-07-26 14:37
 * @notify
 * @version 1.0
 */

import sis.studentinfo.Student;

public class Entry {
    private Student.Grade grade;
    private String message;

    public Entry(Student.Grade grade, String message) {
        this.grade = grade;
        this.message = message;
    }

    public boolean equals(Object object) {
        if (object == null) {
            return false;
        }
        if (object.getClass() != this.getClass()) {
            return false;
        }
        Entry that = (Entry) object;
        return this.grade == that.grade && this.message.equals(that.message);
    }

    public int hashCode() {
        final int hashMultiplier = 41;
        int result = 7;
        result = result * hashMultiplier + grade.hashCode();
        result = result * hashMultiplier + message.hashCode();
        return result;
    }
}
